//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package com.v2coding.mybatis.model;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.v2coding.validate.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.validation.constraints.NotNull;

public class BaseModel<M> implements Serializable {
    @TableId(
            value = "id",
            type = IdType.AUTO
    )
    @ApiModelProperty("id")
    protected @NotNull(
            groups = {UpdateGroup.class},
            message = "ID不能为空"
    ) Long id;
    @TableLogic(value = "Y", delval = "N")
    @TableField("enabled")
    @ApiModelProperty("是否启用")
    @ExcelProperty({"是否启用"})
    protected String enabled = "Y";
    @TableField(
            value = "created_by",
            fill = FieldFill.INSERT
    )
    @ApiModelProperty("创建者")
    @ExcelProperty({"创建者"})
    private String createdBy;
    @TableField(
            value = "created_date",
            fill = FieldFill.INSERT
    )
    @ApiModelProperty("创建时间")
    @ExcelProperty({"创建时间"})
    private Date createdDate;
    @TableField(
            value = "updated_by",
            fill = FieldFill.INSERT_UPDATE
    )
    @ApiModelProperty("更新者")
    @ExcelProperty({"更新者"})
    private String updatedBy;
    @TableField(
            value = "updated_date",
            fill = FieldFill.INSERT_UPDATE
    )
    @ApiModelProperty("更新时间")
    @ExcelProperty({"更新时间"})
    private Date updatedDate;

    public boolean equals(Object obj) {
        if (null == obj) {
            return false;
        } else if (this == obj) {
            return true;
        } else if (!this.getClass().equals(obj.getClass())) {
            return false;
        } else {
            BaseModel<?> that = (BaseModel)obj;
            return null == this.getId() ? false : this.getId().equals(that.getId());
        }
    }

    public int hashCode() {
        int hashCode = 17;
        hashCode += null == this.getId() ? 0 : this.getId().hashCode() * 31;
        return hashCode;
    }

    public BaseModel() {
    }

    public Long getId() {
        return this.id;
    }

    public String getEnabled() {
        return this.enabled;
    }

    public String getCreatedBy() {
        return this.createdBy;
    }

    public Date getCreatedDate() {
        return this.createdDate;
    }

    public String getUpdatedBy() {
        return this.updatedBy;
    }

    public Date getUpdatedDate() {
        return this.updatedDate;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setEnabled(final String enabled) {
        this.enabled = enabled;
    }

    public void setCreatedBy(final String createdBy) {
        this.createdBy = createdBy;
    }

    public void setCreatedDate(final Date createdDate) {
        this.createdDate = createdDate;
    }

    public void setUpdatedBy(final String updatedBy) {
        this.updatedBy = updatedBy;
    }

    public void setUpdatedDate(final Date updatedDate) {
        this.updatedDate = updatedDate;
    }

    public String toString() {
        Long var10000 = this.getId();
        return "BaseModel(id=" + var10000 + ", enabled=" + this.getEnabled() + ", createdBy=" + this.getCreatedBy() + ", createdDate=" + this.getCreatedDate() + ", updatedBy=" + this.getUpdatedBy() + ", updatedDate=" + this.getUpdatedDate() + ")";
    }
}
